<!DOCTYPE html>
<html>
  <head>
    <meta charset="UTF-8">
    <style>
input { width:30px }      
    </style>
  </head>
  <body>
<script>
function printTime() {
  var time = document.getElementById('time')
  time.innerText = new Date()
  setTimeout(printTime, 1000);
}

setTimeout(printTime, 1000);
</script>    
    <label id="time"></label>
  </body>
</html>